package com.wanmait.teatrain.controller;

import com.wanmait.teatrain.dto.AdminPaperDTO;
import com.wanmait.teatrain.service.PaperQuestionService;
import com.wanmait.teatrain.utils.AjaxResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 考试-试卷与题目关联表 前端控制器
 * </p>
 *
 * @author wanmait
 * @since 2025-10-22
 */
@RestController
@RequestMapping("/paperQuestion")
public class PaperQuestionController {
    @Resource
    private PaperQuestionService paperQuestionService;
    //用户交卷之后对试卷和其答案进行提交
    @PostMapping("/submit")
    public AjaxResult submit(@RequestBody AdminPaperDTO adminPaperDTO) {
        return paperQuestionService.submit(adminPaperDTO);
    }
}
